//
//  AppDelegate+CAppDelegate.m
//  iosapp
//
//  Created by 吴彬 on 15/12/4.
//  Copyright © 2015年 吴彬. All rights reserved.
//

#import "AppDelegate+CAppDelegate.h"

@implementation AppDelegate (CAppDelegate)
-(void)showAllAppearance{
    //设置UINavigationBar高亮颜色
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    //设置UINavigationBar背景色
    [[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];
    //设置UINavigationBar标题大小和颜色
    [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
                                                           [UIColor whiteColor], NSForegroundColorAttributeName, [UIFont systemFontOfSize:21], NSFontAttributeName, nil]];
    //设置UIStatus为浅色
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
//    //屏蔽返回按钮的title
//    UIImage *backButtonImage = [[UIImage imageNamed:@"default_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, 0, 0)];
//    [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    //将返回按钮的文字position设置不在屏幕上显示
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsCompact];

    //TabBar背景色
    [[UITabBar appearance] setBarTintColor:[UIColor whiteColor]];
    //TabBar点击效果颜色
    [[UITabBar appearance] setTintColor:[UIColor redColor]];
//    UIStatusBar 
//    //单个页面设置取消屏蔽返回按钮
//    UIBarButtonItem *barBtn = [[UIBarButtonItem alloc]init];
//    barBtn.title=@"";
//    self.navigationItem.leftBarButtonItem=barBtn;
//    [_photoview setClipsToBounds:YES];
    
    
//    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
//    
//    NSDictionary *navbarTitleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor]};
//    [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
//    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
//    
//    [[UITabBar appearance] setTintColor:[UIColor colorWithHex:0x15A230]];
//    [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:0x15A230]} forState:UIControlStateSelected];
//    
//    [[UINavigationBar appearance] setBarTintColor:[UIColor navigationbarColor]];
//    [[UITabBar appearance] setBarTintColor:[UIColor titleBarColor]];
//    
//    [UISearchBar appearance].tintColor = [UIColor colorWithHex:0x15A230];
//    [[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setCornerRadius:14.0];
//    [[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setAlpha:0.6];
//    
//    [[UINavigationBar appearance] setBarTintColor:[UIColor navigationbarColor]];
//    [[UITabBar appearance] setBarTintColor:[UIColor titleBarColor]];
    //解决tabbar遮挡问题
//    self.edgesForExtendedLayout = UIRectEdgeAll;
//    self.tableView.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, self.footerHeight, 0.0f);
 
}
@end
